package com.example.academic_affairs_system.model.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author hjx
 * @since 2023-01-31
 */
@Getter
@Setter
@Builder
@Accessors(chain = true)
@TableName("aas_class")
@ApiModel(value = "AssClass对象", description = "")
public class AasClass implements Serializable {

  private static final long serialVersionUID = 1L;

  @TableId(value = "id", type = IdType.AUTO)
  private Long id;

  @ApiModelProperty("负责人用户 id")
  private Long directorsUserId;

  @ApiModelProperty("班级的编码")
  private Long classCode;

  @ApiModelProperty("班级名称")
  private String name;

  @ApiModelProperty("班级描述")
  @TableField("`desc`")
  private String desc;

  @ApiModelProperty("班级性质")
  @TableField("`type`")
  private String type;

  @ApiModelProperty("课程表安排")
  private String timetable;

  @ApiModelProperty("创建时间")
  @TableField(fill = FieldFill.INSERT)
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  private LocalDateTime createTime;

  @ApiModelProperty("更新时间")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  private LocalDateTime updateTime;

  @ApiModelProperty("是否可用")
  @TableLogic
  private Boolean enabled;
}
